package com.zy.shiro.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * sys_user
 * @author 
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SysUser对象", description="系统用户")
public class SysUser implements Serializable {
    /**
     * 主键用户id
     */
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    /**
     * 用户名
     */
    @TableField(value = "userName",exist = true)
    private String userName;

    /**
     * 密码
     */
    private String password;

    /**
     * 电话号码
     */
    @TableField(value = "phoneNum",exist = true)
    private String phoneNum;

    /**
     * 状态  0：禁用   1：正常
     */
    private Integer status;

    /**
     * 创建用户id
     */
    private Long createUserId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH-ss-mm")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @TableField(exist = false)
    @ApiModelProperty("角色的id集合")
    private List<Long> roleIdList;

    private static final long serialVersionUID = 1L;


}